const initialState = {
  channels: [],
  count: 0,
  page: 1,
  per_page: 10,
  list: []
}

export const article = (state = initialState, action) => {
  switch (action.type) {
    case 'article/getChannels':
      return {
        ...state,
        channels: action.payload
      }
    case 'article/getArticles':
      return {
        ...state,
        ...action.payload
      }
    default:
      return state
  }
}
